import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.scss";
import { AntdRegistry } from '@ant-design/nextjs-registry';
import { ConfigProvider } from 'antd';
// import { createRoot } from 'react-dom/client';
import '@ant-design/v5-patch-for-react-19';
const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "小楠博客",
  description: "Generated by create next app",
  // favicon: "/favicon.ico",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" className=" w-full h-full">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased w-full h-full`}
      >
        <ConfigProvider theme={{
          components: {
            Menu: {
              // itemSelectedBg: '#00b96b',
              // itemBg: '#00b96b',
              itemSelectedColor: 'rgba(0, 0, 0, 0.88)',
              itemColor: 'rgba(0, 0, 0, 0.88)',
              itemPaddingInline: 16,
              itemMarginInline: 4,
              iconMarginInlineEnd: 4,

            }
          },
          token: {
            // Seed Token，影响范围大
            colorPrimary: '#00b96b',
            borderRadius: 2,

            // 派生变量，影响范围小
            colorBgContainer: '#f6ffed',
          },
        }}>
          <AntdRegistry>{children}</AntdRegistry>
        </ConfigProvider>
      </body>
    </html>
  );
}
